const { request } = require('../utils/request');
/** 地区：上海闵行 */
const LOCATION = 'minhang'
/** 和风天气状态说明 
 * 1xx: 晴(100) | 多云(101~104)
 * 2xx: 风 200~204(weak), 205~213(strong)
 * 3xx: 雨
 * 4xx: 雪
 * 5xx: 雾 | 沙尘暴
 */
const { _list } = require('../hefeng.json');

/** now 实况天气 */
const getNow = () => {
  return request({
    url: '/now',
    params: {
      location: LOCATION
    }
  })
}

/** forecast 3-10天预报 */
const getForecast = () => {
  return request({
    url: '/forecast',
    params: {
      location: LOCATION
    }
  })
}

/** lifestyle	生活指数 */
const getLifestyle = () => {
  return request({
    url: '/lifestyle',
    params: {
      location: LOCATION
    }
  })
}

module.exports = {
  getLifestyle,
  getForecast,
  getNow
}
